#ifndef INSTRUCTION_H
#define INSTRUCTION_H

#include "defs.h"
#include "retour.h"

enum {RET_NUM, RET_BOOL, RET_DECVAR, RET_ASSIGN, RET_BLOCKBEGIN, RET_BLOCKEND, RET_BRANCH_TAKEN, RET_BRANCH_IGNORED, 
	  RET_LOOPING, RET_NOT_LOOPING, RET_OUT, RET_IN, RET_CALL, RET_RETURN};

enum {CODE_RIEN, CODE_ASSIGN, CODE_DECVAR, CODE_IF, CODE_ELIF, CODE_ELSE, CODE_WHILE, CODE_BLOCKBEGIN, CODE_BLOCKEND, 
	CODE_EMATH, CODE_ECON, CODE_DECFONCTION, CODE_CALL, CODE_RETURN};

class Instruction {
public:
	Instruction();
	virtual Retour evaluer(map<string, Var_T> *loc, map<string, Var_T> *glob) = 0;
	int code;
	virtual ~Instruction();
};

bool validerParentheses(list<token> src);

#endif